package com.zzzy.cont.vo.template;

import com.zzzy.common.enums.YesOrNoEnum;
import com.zzzy.cont.common.enums.TradeTypeEnum;
import com.zzzy.framework.common.annotation.RangeValuesCheck;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Schema(description = "新增合同文件模板")
@Data
public class ConFileTemplateAddReq {

    @Schema(description = "文件模板名称")
    @NotBlank(message = "文件模板名称不能为空")
    @Length(max = 100, message = "文件模板名称不能超过100个字符")
    private String name;

    @Schema(description = "交易类型：采购、销售")
    @RangeValuesCheck(enumValueRange = TradeTypeEnum.class, message = "交易类型填写错误")
    private String tradeType;

    @Schema(description = "是否固定格式：是、否")
    @RangeValuesCheck(enumValueRange = YesOrNoEnum.class, message = "是否固定格式填写错误")
    private String isFixedFormat;

    @Schema(description = "描述备注")
    @Length(max = 255, message = "备注信息不能超过255个字符")
    private String memo;
}
